package com.itfreer.gis.map.resource.entity;

import com.itfreer.form.api.entity.EntityBase;

import javax.persistence.*;

/**
 * 定义资源目录实体类
 */
@Entity(name = "gis_resource_content")
@Table(indexes = { @Index(name = "gis_resource_code", columnList = "s_code"),
		@Index(name = "gis_resource_pid", columnList = "s_pid") })
public class ResourceContentEntity extends EntityBase {

	private static final long serialVersionUID = -8626739652637419167L;

	/**
	 * id值，主键，唯一值 系统应用中必需关联此值
	 */
	@Id
	@Column(name = "id", length = 50, nullable = false)
	private String id;

	/**
	 * 代码值
	 */
	@Column(name = "s_code", length = 50, nullable = true)
	private String code;

	/**
	 * 显示名称
	 */
	@Column(name = "s_name", length = 255, nullable = true)
	private String name;

	/**
	 * 翻译值
	 */
	@Column(name = "s_display", length = 255, nullable = true)
	private String display;

	/**
	 * 排序值
	 */
	@Column(name = "i_order", nullable = true, length = 8)
	private Integer order;

	/**
	 * 是否有效
	 */
	@Column(name = "b_valid", nullable = true)
	private boolean valid = true;

	/**
	 * 是否编辑
	 */

	@Column(name = "b_edit", nullable = true)
	private boolean edit = true;

	/**
	 * 说明
	 */
	@Column(name = "s_info", columnDefinition = "text", nullable = true)
	private String info;

	/**
	 * 父级id
	 */
	@Column(name = "s_pid", length = 50, nullable = true)
	private String pid;

	/**
	 * 是否为最后级别
	 */
	@Column(name = "b_leaf", nullable = true)
	private boolean leaf;
	
	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantid", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantname", length = 50, nullable = true)
	private String tenantName;
	
	/**
	 * 存放内容
	 */
	@Column(name = "s_content", columnDefinition = "text", nullable = true)
	private String scontent;

	@Override
	public String getId() {
		return id;
	}

	@Override
	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDisplay() {
		return display;
	}

	public void setDisplay(String display) {
		this.display = display;
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	public boolean getValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	public boolean getEdit() {
		return edit;
	}

	public void setEdit(boolean edit) {
		this.edit = edit;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public boolean getLeaf() {
		return leaf;
	}

	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	public String getTenantID() {
		return tenantID;
	}

	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}

	public String getScontent() {
		return scontent;
	}

	public void setScontent(String scontent) {
		this.scontent = scontent;
	}
	
}
